package com.thinkgem.jeesite.modules.cms.service;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.cms.dao.Record_taskDao;
import com.thinkgem.jeesite.modules.cms.entity.Record_task;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional(readOnly=true)
public class RecordService_task
  extends CrudService<Record_taskDao, Record_task>
{
  @Transactional(readOnly=false)
  public Page<Record_task> findPage(Page<Record_task> page, Record_task record, boolean isDataScopeFilter)
  {
    return super.findPage(page, record);
  }
  
  @Transactional(readOnly=false)
  public void save(Record_task record)
  {
    if (StringUtils.isBlank(record.getId()))
    {
      record.preInsert();
      ((Record_taskDao)this.dao).insert(record);
    }
    else
    {
      record.preUpdate();
      ((Record_taskDao)this.dao).update(record);
    }
  }
  
  @Transactional(readOnly=false)
  public void delete(Record_task record, Boolean isRe)
  {
    super.delete(record);
  }
}
